# 条件编译
# option(EN_COMPILE "Enable MPP compile." ON)
# if (EN_COMPILE)

# 添加源文件到变量
aux_source_directory (./smart/ SRC_SMART_LIST)               

# 指定库路径
link_directories(
    ${PROJECT_SOURCE_DIR}/inc/log/
    ${PROJECT_SOURCE_DIR}/inc/clocker/
    ${PROJECT_SOURCE_DIR}/lib/mpp/
)

# 链接静态库
link_libraries(utils clocker log)

# 生成可执行文件并链接动态库
# MPP H264解码DEMO 异步
add_executable(tst_decode_h264_asyn_run tst_decode_h264_asyn.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_decode_h264_asyn_run pthread rockchip_mpp)

# MPP H264解码DEMO 同步
add_executable(tst_decode_h264_sync_run tst_decode_h264_sync.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_decode_h264_sync_run pthread rockchip_mpp)

# 生成可执行文件并链接动态库
add_executable(tst_encode_run tst_encode.cpp ../camera/smart/smart_camera.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_encode_run pthread rockchip_mpp)

# 生成可执行文件并链接动态库
add_executable(tst_encoder_frame_parse_run tst_encoder_frame_parse.cpp ../camera/smart/smart_camera.cpp ${SRC_SMART_LIST})
target_link_libraries (tst_encoder_frame_parse_run pthread rockchip_mpp)

# 重定向可执行文件输出文件位置
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/out/mpp)

# endif()